#pragma once
#include<iostream>
#include<assert.h>
using namespace std;


class Date
{
	friend ostream& operator<<(ostream& out, const Date& d);
	friend istream& operator>>(istream& in, Date& d);
public:
	Date(int year = 1, int month = 1, int day = 1);

	int GetMonthDay(int year, int month)const;

	Date(const Date& d);

	const Date& operator=(const Date& d);

	bool operator<(const Date& d)const;

	bool operator==(const Date& d)const;

	bool operator!=(const Date& d)const;

	bool operator<=(const Date& d)const;

	bool operator>(const Date& d)const;

	bool operator>=(const Date& d)const;
	
	Date& operator+=(int day);

	Date operator+(int day)const;

	Date& operator-=(int day);

	Date operator-(int day)const;
	
	int operator-(const Date& d)const;

	Date& operator++();

	Date operator++(int);



private:
	int _year;
	int _month;
	int _day;
};

ostream& operator<<(ostream& out, const Date& d);
istream& operator>>(istream& in,  Date& d);